<html>
<body>
Reports type casts that are overly strong. For instance,
casting an object to <code>ArrayList</code> when casting it to
<code>List</code> would do just as well.
<p>
  <b>Note:</b> much like the <i>Redundant type cast</i>
  inspection, applying the fix for this inspection may change the semantics of your program if you are
  intentionally using an overly strong cast to cause a <code>ClassCastException</code> to be generated.
</p>
<p>Example:</p>
<pre><code>
  interface Super {
    void doSmth();
  }
  interface Sub extends Super { }

  void use(Object obj) {
    // Warning: ((Super)obj).doSmth() could be used
    ((Sub)obj).doSmth();
  }
</code></pre>
<!-- tooltip end -->
<p>
  Use the checkbox below to ignore casts when there's a matching <code>instanceof</code> check in the code.
</body>
</html>